package net.aiion.weave.impl.bytecode.events;

import net.aiion.weave.spi.bytecode.BytecodeVisitor;
import net.aiion.weave.spi.bytecode.events.AnnotationEnumValueBytecodeEvent;

public class AnnotationEnumValueBytecodeEventImpl extends BytecodeEventImpl implements AnnotationEnumValueBytecodeEvent
{
    private String name;
    private String descriptor;
    private String value;

    public AnnotationEnumValueBytecodeEventImpl(final String aName, final String aDescriptor, final String aValue) {
        name = aName;
        descriptor = aDescriptor;
        value = aValue;
    }

    @Override
    public int getType() {
        return ANNOTATION_ENUM_VALUE;
    }

    @Override
    public void setName(final String aName) {
        name = aName;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public void setDescriptor(final String aDescriptor) {
        descriptor = aDescriptor;
    }

    @Override
    public String getDescriptor() {
        return descriptor;
    }

    @Override
    public void setValue(final String aValue) {
        value = aValue;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public BytecodeVisitor acceptBytecodeVisitor(final BytecodeVisitor aBytecodeVisitor) {
        aBytecodeVisitor.asBytecodeAnnotationVisitor().visitAnnotationEnumValue(this);
        return aBytecodeVisitor;
    }
}
